package com.chinacoal.microservice.fallback;

import com.chinacoal.microservice.MaintenanceRecordsClient;
import com.chinacoal.microservice.pojo.CcmsSmartleasingRepair;
import com.chinacoal.microservice.util.CodeMsg;
import com.chinacoal.microservice.util.QueryCriteria;
import com.chinacoal.microservice.util.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhuliang
 * @version V1.0
 * @Description: 房源管理-维修记录-回退类
 * @date 2020-11-10 10：32
 */
@Component
public class MaintenanceRecordsClientFallback implements MaintenanceRecordsClient {

    /**
     * @Description: 查询所有的维修记录（带分页），异常回退类
     * @author zhuliang
     * @date 2020/11/10 13:54
     */
    @Override
    public Result<List<CcmsSmartleasingRepair>> getMaintenanceRecords(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据维修信息id查询对应的信息,异常回退类
     * @author zhuliang
     * @date 2020/11/10 14:18
     */
    @Override
    public Result<CcmsSmartleasingRepair> getMaintenanceById(String pkRepairId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 添加维修信息，异常回退类
     * @author zhuliang
     * @date 2020/11/10 14:29
     */
    @Override
    public Result<Object> addMaintenanceRecords(CcmsSmartleasingRepair repair, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 修改维修信息，异常回退类
     * @author zhuliang
     * @date 2020/11/10 14:36
     */
    @Override
    public Result<Object> updateMaintenanceRecords(CcmsSmartleasingRepair repair, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 根据维修信息id删除对应的维修信息,异常回退类
     * @author zhuliang
     * @date 2020/11/10 14:42
     */
    @Override
    public Result delectMaintenanceRecords( String deleteId, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }

    /**
     * @Description: 查询维修信息，异常回退类
     * @author zhuliang
     * @date 2020/11/10 16:06
     */
    @Override
    public Result<List<CcmsSmartleasingRepair>> queryMaintenanceRecords(QueryCriteria queryCriteria, String token) {
        return Result.error(CodeMsg.METHOD_NOT_SUPPORTED);
    }
}
